package com.park.web.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.park.client.service.article.ArticleService;

/**
 *从csdn抓取文章
 */
@DisallowConcurrentExecution
public class GetArticleFromCSDN implements Job{
	private static final Logger logger = LoggerFactory.getLogger(GetArticleFromCSDN.class);

	@Autowired
	private ArticleService articleService;
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		logger.info("从csdn抓取文章");
		articleService.saveArticleFromCSDN();
	}

}
